<template>
  <div>
      <v-navigation-drawer
              v-model="drawer"
              app
              clipped
              disable-resize-watcher
      >
          <v-list dense>
              <v-list-item link     v-for="(item, i) in items"
                           :key="i" :to="item.address">
                  <v-list-item-action>
                      <v-icon v-text="item.icon"></v-icon>
                  </v-list-item-action>
                  <v-list-item-content>
                      <v-list-item-title v-text="item.text"></v-list-item-title>
                  </v-list-item-content>
              </v-list-item>
                 </v-list>
      </v-navigation-drawer>
      <v-app-bar class="Homeheader" color="light-blue darken-4">
          <v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
          <v-icon class="iconfont icon-title"></v-icon>
          <v-spacer></v-spacer>
      </v-app-bar>
  </div>
</template>

<script>
  export default {
      props:['type_'],
    data(){
      return {
          item: 0,
          items:'',
          drawer: null
      }
         },
      methods:{
        _begin(){
            if(this.type_==='use'||this.type_==='use_ok'){
                this.items=[
                    { text: '预约记录', icon: 'mdi-folder',address:'' },
                    { text: '费用记录', icon: 'mdi-account-multiple',address:'' },
                    { text: '就诊记录', icon: 'mdi-star',address:'' },
                    { text: '消息中心', icon: 'mdi-history' ,address:''},
                    { text: '更多', icon: 'mdi-check-circle',address:'' },
                    { text: '回到首页', icon: 'mdi-check-circle',address:'/home' }
                ]}
            else if(this.type_==="adm"||this.type_==='adm_ok'){
                this.items=[
                    { text: '添加科室', icon: 'mdi-folder',address:'/keshi' },
                    { text: '医生管理', icon: 'mdi-folder',address:'/doctor' },
                    { text: '排班管理', icon: 'mdi-folder',address:'/paiban' },
                    { text: '预约管理', icon: 'mdi-account-multiple',address:'/yuyuetable' },
                    { text: '轮播管理', icon: 'mdi-star',address:'/slide' },
                    { text: '通知管理', icon: 'mdi-history' ,address:''},
                    { text: '消息中心', icon: 'mdi-check-circle',address:'' },
                    { text: '回到首页', icon: 'mdi-check-circle',address:'/home' }
                ]
            }
            else{
                this.items=[
                    { text: '预约记录', icon: 'mdi-folder',address:'' },
                    { text: '费用记录', icon: 'mdi-account-multiple',address:'' },
                    { text: '就诊记录', icon: 'mdi-star',address:'' },
                    { text: '消息中心', icon: 'mdi-history' ,address:''},
                    { text: '更多', icon: 'mdi-check-circle',address:'' },
                    { text: '回到首页测试', icon: 'mdi-check-circle',address:'/home' }
                ]
            }
        }
      },
      mounted(){
          this._begin()
  }}
</script>

<style  scoped>
    .Homeheader i {
        color:white;
        text-align: center;
        display: block;
    }
    .Homeheader {
            background-image: linear-gradient(to bottom right, darkblue ,purple);
    }
</style>
